
import {createRouter as _createRouter, createWebHistory} from 'vue-router';


import register from '../views/register.vue'
import login from '../views/login.vue'

import home from '../views/home.vue'
import call from '../views/call.vue'
import my from '../views/my.vue'
import vip from '../views/vip.vue'
import wallet from '../views/wallet.vue'

//  配置路由组
const routes = [
    {
        name:'register',
        path:'/register',
        component:register,
        meta:{
            TabbarShow:false
        }
    },
    {
        name:'login',
        path:'/login',
        component:login,
        meta:{
            TabbarShow:false
        }
    },
    {
        name:'home',
        path:'/home',
        component:home,
        meta:{
            TabbarShow:true
        }
    },
    {
        name:'call',
        path:'/call',
        component:call,
        meta:{
            TabbarShow:true
        }
    },
    {
        name:'my',
        path:'/my',
        component:my,
        meta:{
            TabbarShow:true
        }
    },
    {
        name:'vip',
        path:'/vip',
        component:vip,
        meta:{
            TabbarShow:false
        }
    },
    {
        name:'wallet',
        path:'/wallet',
        component:wallet,
        meta:{
            TabbarShow:false
        }
    }
]



export function createRouter() {
    return _createRouter({
        history: createWebHistory(),
        routes   //绑定路由组 和 路由管理者
    })
}